// react-select 样式兼容至UI规范, 参考 https://deploy-preview-2289--react-select.netlify.com/styles
.select {
  font-size: 12px;

  // 控制条
  &__control {
    display: block;
    height: $select-height;

    // 保证文字居中
    line-height: $select-height - 2;
    min-height: $select-height;
    border-radius: 0;
    background-color: #fff;

    &--is-focused {
      &:hover {
        border-color: $border-color;
      }

      box-shadow: none;
      border-color: $border-color;
    }
  }

  &__input {
    margin-left: 2px;
    max-width: 100%;

    input {
      max-width: 100%;

      > div {
        max-width: 100%;
      }
    }
  }

  &__value-container {
    width: calc(100% - 30px);
    height: 100%;
    padding: 0;
    padding-left: 6px;
    display: block;
    float: left;
  }

  // 输入框文本居中
  &__value-container > div:last-child {
    margin: 0;
    padding: 0;
  }

  &__indicators {
    display: block;
    float: right;
    padding: 0 5px 0 0;
    height: 100%;
  }

  &__dropdown-indicator {
    padding: 2px;
    display: inline-block;
    height: 100%;
  }

  // 菜单
  &__menu {
    margin-top: 5px;
    border-radius: 0;
  }

  // 菜单选项
  &__option {
    min-height: $select-height;
    height: $select-height;
    line-height: $select-height - 2;
    padding: 0 8px;

    &--is-focused {
      background-color: #e8e8e8;
      color: $primary-color;
    }

    &--is-selected {
      color: $primary-color;
      background-color: #fff;

      &:hover {
        background-color: #e8e8e8;
      }
    }

    &:active {
      background-color: #e8e8e8;
    }
  }
}
